home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac Interfaces / PInterfaces / QD3D.p < prev    next >
Encoding:
Text File  |  1999-05-18  |  33.2 KB  |  1,027 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3D.p
  3.  
  4.      Contains:    Base types for Quickdraw 3D                            
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.6
  7.                  Release:    QuickTime 4.0
  8.  
  9.      Copyright:    © 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT QD3D;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __QD3D__}
  27. {$SETC __QD3D__ := 1}
  28.  
  29. {$I+}
  30. {$SETC QD3DIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __CONDITIONALMACROS__}
  34. {$I ConditionalMacros.p}
  35. {$ENDC}
  36.  
  37. {$IFC TARGET_OS_MAC }
  38. {$IFC UNDEFINED __MACTYPES__}
  39. {$I MacTypes.p}
  40. {$ENDC}
  41. {$ENDC}  {TARGET_OS_MAC}
  42.  
  43.  
  44. {$PUSH}
  45. {$ALIGN POWER}
  46. {$LibExport+}
  47.  
  48. {$IFC TARGET_OS_MAC }
  49. {$SETC OS_MACINTOSH := 1 }
  50. {$SETC OS_WIN32 := 0 }
  51. {$SETC OS_UNIX := 0 }
  52. {$SETC OS_NEXT := 0 }
  53. {$SETC WINDOW_SYSTEM_MACINTOSH := 1 }
  54. {$SETC WINDOW_SYSTEM_WIN32 := 0 }
  55. {$SETC WINDOW_SYSTEM_X11 := 0 }
  56. {$SETC WINDOW_SYSTEM_NEXT := 0 }
  57. {$ENDC}  {TARGET_OS_MAC}
  58.  
  59.  
  60. {*****************************************************************************
  61.  **                                                                             **
  62.  **                                NULL definition                                 **
  63.  **                                                                             **
  64.  ****************************************************************************}
  65. {*****************************************************************************
  66.  **                                                                             **
  67.  **                                    Objects                                     **
  68.  **                                                                             **
  69.  ****************************************************************************}
  70. {
  71.  * Everything in QuickDraw 3D is an OBJECT: a bunch of data with a type,
  72.  * deletion, duplication, and i/o methods.
  73.  }
  74.  
  75. TYPE
  76.     TQ3ObjectType                        = LONGINT;
  77.     TQ3ObjectTypePtr                    = ^TQ3ObjectType;
  78.     TQ3Object = ^LONGINT;
  79. {   }
  80. {
  81.  * There are four subclasses of OBJECT:
  82.  *    an ELEMENT, which is data that is placed in a SET
  83.  *    a SHAREDOBJECT, which is reference-counted data that is shared
  84.  *    VIEWs, which maintain state information for an image
  85.  *    a PICK, which used to query a VIEW
  86.  }
  87.     TQ3ElementObject                    = TQ3Object;
  88.     TQ3SharedObject                        = TQ3Object;
  89.     TQ3ViewObject                        = TQ3Object;
  90.     TQ3PickObject                        = TQ3Object;
  91. {
  92.  * There are several types of SharedObjects:
  93.  *    RENDERERs, which paint to a drawContext
  94.  *    DRAWCONTEXTs, which are an interface to a device 
  95.  *    SETs, which maintains "mathematical sets" of ELEMENTs
  96.  *    FILEs, which maintain state information for a metafile
  97.  *    SHAPEs, which affect the state of the View
  98.  *    SHAPEPARTs, which contain geometry-specific data about a picking hit
  99.  *    CONTROLLERSTATEs, which hold state of the output channels for a CONTROLLER
  100.  *    TRACKERs, which represent a position and orientation in the user interface
  101.  *  STRINGs, which are abstractions of text string data.
  102.  *    STORAGE, which is an abstraction for stream-based data storage (files, memory)
  103.  *    TEXTUREs, for sharing bitmap information for TEXTURESHADERS
  104.  *    VIEWHINTs, which specifies viewing preferences in FILEs
  105.  }
  106.     TQ3RendererObject                    = TQ3SharedObject;
  107.     TQ3DrawContextObject                = TQ3SharedObject;
  108.     TQ3SetObject                        = TQ3SharedObject;
  109.     TQ3FileObject                        = TQ3SharedObject;
  110.     TQ3ShapeObject                        = TQ3SharedObject;
  111.     TQ3ShapePartObject                    = TQ3SharedObject;
  112.     TQ3ControllerStateObject            = TQ3SharedObject;
  113.     TQ3TrackerObject                    = TQ3SharedObject;
  114.     TQ3StringObject                        = TQ3SharedObject;
  115.     TQ3StorageObject                    = TQ3SharedObject;
  116.     TQ3TextureObject                    = TQ3SharedObject;
  117.     TQ3ViewHintsObject                    = TQ3SharedObject;
  118. {
  119.  * There is one types of SET:
  120.  *    ATTRIBUTESETs, which contain ATTRIBUTEs which are inherited 
  121.  }
  122.     TQ3AttributeSet                        = TQ3SetObject;
  123.     TQ3AttributeSetPtr                    = ^TQ3AttributeSet;
  124. {
  125.  * There are many types of SHAPEs:
  126.  *    LIGHTs, which affect how the RENDERER draws 3-D cues
  127.  *    CAMERAs, which affects the location and orientation of the RENDERER in space
  128.  *    GROUPs, which may contain any number of SHARED OBJECTS
  129.  *    GEOMETRYs, which are representations of three-dimensional data
  130.  *    SHADERs, which affect how colors are drawn on a geometry
  131.  *    STYLEs, which affect how the RENDERER paints to the DRAWCONTEXT
  132.  *    TRANSFORMs, which affect the coordinate system in the VIEW
  133.  *    REFERENCEs, which are references to objects in FILEs
  134.  *  UNKNOWN, which hold unknown objects read from a metafile.
  135.  }
  136.     TQ3GroupObject                        = TQ3ShapeObject;
  137.     TQ3GeometryObject                    = TQ3ShapeObject;
  138.     TQ3ShaderObject                        = TQ3ShapeObject;
  139.     TQ3StyleObject                        = TQ3ShapeObject;
  140.     TQ3TransformObject                    = TQ3ShapeObject;
  141.     TQ3LightObject                        = TQ3ShapeObject;
  142.     TQ3CameraObject                        = TQ3ShapeObject;
  143.     TQ3UnknownObject                    = TQ3ShapeObject;
  144.     TQ3ReferenceObject                    = TQ3ShapeObject;
  145.     TQ3StateOperatorObject                = TQ3ShapeObject;
  146. {
  147.  * For now, there is only one type of SHAPEPARTs:
  148.  *    MESHPARTs, which describe some part of a mesh
  149.  }
  150.     TQ3MeshPartObject                    = TQ3ShapePartObject;
  151. {
  152.  * There are three types of MESHPARTs:
  153.  *    MESHFACEPARTs, which describe a face of a mesh
  154.  *    MESHEDGEPARTs, which describe a edge of a mesh
  155.  *    MESHVERTEXPARTs, which describe a vertex of a mesh
  156.  }
  157.     TQ3MeshFacePartObject                = TQ3MeshPartObject;
  158.     TQ3MeshEdgePartObject                = TQ3MeshPartObject;
  159.     TQ3MeshVertexPartObject                = TQ3MeshPartObject;
  160. {
  161.  * A DISPLAY Group can be drawn to a view
  162.  }
  163.     TQ3DisplayGroupObject                = TQ3GroupObject;
  164. {
  165.  * There are many types of SHADERs:
  166.  *    SURFACESHADERs, which affect how the surface of a geometry is painted
  167.  *    ILLUMINATIONSHADERs, which affect how lights affect the color of a surface
  168.  }
  169.     TQ3SurfaceShaderObject                = TQ3ShaderObject;
  170.     TQ3IlluminationShaderObject            = TQ3ShaderObject;
  171. {
  172.  * A handle to an object in a group
  173.  }
  174.     TQ3GroupPosition = ^LONGINT;
  175.     TQ3GroupPositionPtr                    = ^TQ3GroupPosition;
  176.  * TQ3ObjectClassNameString is used for the class name of an object
  177.  }
  178.  
  179. CONST
  180.     kQ3StringMaximumLength        = 1024;
  181.  
  182.  
  183. TYPE
  184.     TQ3ObjectClassNameString            = PACKED ARRAY [0..1023] OF CHAR;
  185. {*****************************************************************************
  186.  **                                                                             **
  187.  **                            Client/Server Things                             **
  188.  **                                                                             **
  189.  ****************************************************************************}
  190.     TQ3ControllerRef                    = Ptr;
  191. {*****************************************************************************
  192.  **                                                                             **
  193.  **                            Flags and Switches                                 **
  194.  **                                                                             **
  195.  ****************************************************************************}
  196.     TQ3Boolean                     = SInt32;
  197. CONST
  198.     kQ3False                    = 0;
  199.     kQ3True                        = 1;
  200.  
  201.  
  202. TYPE
  203.     TQ3Switch                     = SInt32;
  204. CONST
  205.     kQ3Off                        = 0;
  206.     kQ3On                        = 1;
  207.  
  208.  
  209. TYPE
  210.     TQ3Status                     = SInt32;
  211. CONST
  212.     kQ3Failure                    = 0;
  213.     kQ3Success                    = 1;
  214.  
  215.  
  216. TYPE
  217.     TQ3Axis                     = SInt32;
  218. CONST
  219.     kQ3AxisX                    = 0;
  220.     kQ3AxisY                    = 1;
  221.     kQ3AxisZ                    = 2;
  222.  
  223.  
  224. TYPE
  225.     TQ3PixelType                 = SInt32;
  226. CONST
  227.     kQ3PixelTypeRGB32            = 0;                            {  Alpha:8 (ignored), R:8, G:8, B:8     }
  228.     kQ3PixelTypeARGB32            = 1;                            {  Alpha:8, R:8, G:8, B:8              }
  229.     kQ3PixelTypeRGB16            = 2;                            {  Alpha:1 (ignored), R:5, G:5, B:5     }
  230.     kQ3PixelTypeARGB16            = 3;                            {  Alpha:1, R:5, G:5, B:5              }
  231.     kQ3PixelTypeRGB16_565        = 4;                            {  Win32 only: 16 bits/pixel, R:5, G:6, B:5         }
  232.     kQ3PixelTypeRGB24            = 5;                            {  Win32 only: 24 bits/pixel, R:8, G:8, B:8         }
  233.  
  234.  
  235. TYPE
  236.     TQ3Endian                     = SInt32;
  237. CONST
  238.     kQ3EndianBig                = 0;
  239.     kQ3EndianLittle                = 1;
  240.  
  241.  
  242. TYPE
  243.     TQ3EndCapMasks                 = SInt32;
  244. CONST
  245.     kQ3EndCapNone                = 0;
  246.     kQ3EndCapMaskTop            = $01;
  247.     kQ3EndCapMaskBottom            = $02;
  248.     kQ3EndCapMaskInterior        = $04;
  249.  
  250.  
  251. TYPE
  252.     TQ3EndCap                            = UInt32;
  253.  
  254. CONST
  255.     kQ3ArrayIndexNULL            = -1;
  256.  
  257. {*****************************************************************************
  258.  **                                                                             **
  259.  **                        Point and Vector Definitions                         **
  260.  **                                                                             **
  261.  ****************************************************************************}
  262.  
  263. TYPE
  264.     TQ3Vector2DPtr = ^TQ3Vector2D;
  265.     TQ3Vector2D = RECORD
  266.         x:                        Single;
  267.         y:                        Single;
  268.     END;
  269.  
  270.     TQ3Vector3DPtr = ^TQ3Vector3D;
  271.     TQ3Vector3D = RECORD
  272.         x:                        Single;
  273.         y:                        Single;
  274.         z:                        Single;
  275.     END;
  276.  
  277.     TQ3Point2DPtr = ^TQ3Point2D;
  278.     TQ3Point2D = RECORD
  279.         x:                        Single;
  280.         y:                        Single;
  281.     END;
  282.  
  283.     TQ3Point3DPtr = ^TQ3Point3D;
  284.     TQ3Point3D = RECORD
  285.         x:                        Single;
  286.         y:                        Single;
  287.         z:                        Single;
  288.     END;
  289.  
  290.     TQ3RationalPoint4DPtr = ^TQ3RationalPoint4D;
  291.     TQ3RationalPoint4D = RECORD
  292.         x:                        Single;
  293.         y:                        Single;
  294.         z:                        Single;
  295.         w:                        Single;
  296.     END;
  297.  
  298.     TQ3RationalPoint3DPtr = ^TQ3RationalPoint3D;
  299.     TQ3RationalPoint3D = RECORD
  300.         x:                        Single;
  301.         y:                        Single;
  302.         w:                        Single;
  303.     END;
  304.  
  305. {*****************************************************************************
  306.  **                                                                             **
  307.  **                                Quaternion                                     **
  308.  **                                                                             **
  309.  ****************************************************************************}
  310.     TQ3QuaternionPtr = ^TQ3Quaternion;
  311.     TQ3Quaternion = RECORD
  312.         w:                        Single;
  313.         x:                        Single;
  314.         y:                        Single;
  315.         z:                        Single;
  316.     END;
  317.  
  318. {*****************************************************************************
  319.  **                                                                             **
  320.  **                                Ray Definition                                 **
  321.  **                                                                             **
  322.  ****************************************************************************}
  323.     TQ3Ray3DPtr = ^TQ3Ray3D;
  324.     TQ3Ray3D = RECORD
  325.         origin:                    TQ3Point3D;
  326.         direction:                TQ3Vector3D;
  327.     END;
  328.  
  329. {*****************************************************************************
  330.  **                                                                             **
  331.  **                        Parameterization Data Structures                     **
  332.  **                                                                             **
  333.  ****************************************************************************}
  334.     TQ3Param2DPtr = ^TQ3Param2D;
  335.     TQ3Param2D = RECORD
  336.         u:                        Single;
  337.         v:                        Single;
  338.     END;
  339.  
  340.     TQ3Param3DPtr = ^TQ3Param3D;
  341.     TQ3Param3D = RECORD
  342.         u:                        Single;
  343.         v:                        Single;
  344.         w:                        Single;
  345.     END;
  346.  
  347.     TQ3Tangent2DPtr = ^TQ3Tangent2D;
  348.     TQ3Tangent2D = RECORD
  349.         uTangent:                TQ3Vector3D;
  350.         vTangent:                TQ3Vector3D;
  351.     END;
  352.  
  353.     TQ3Tangent3DPtr = ^TQ3Tangent3D;
  354.     TQ3Tangent3D = RECORD
  355.         uTangent:                TQ3Vector3D;
  356.         vTangent:                TQ3Vector3D;
  357.         wTangent:                TQ3Vector3D;
  358.     END;
  359.  
  360. {*****************************************************************************
  361.  **                                                                             **
  362.  **                        Polar and Spherical Coordinates                         **
  363.  **                                                                             **
  364.  ****************************************************************************}
  365.     TQ3PolarPointPtr = ^TQ3PolarPoint;
  366.     TQ3PolarPoint = RECORD
  367.         r:                        Single;
  368.         theta:                    Single;
  369.     END;
  370.  
  371.     TQ3SphericalPointPtr = ^TQ3SphericalPoint;
  372.     TQ3SphericalPoint = RECORD
  373.         rho:                    Single;
  374.         theta:                    Single;
  375.         phi:                    Single;
  376.     END;
  377.  
  378. {*****************************************************************************
  379.  **                                                                             **
  380.  **                            Color Definition                                 **
  381.  **                                                                             **
  382.  ****************************************************************************}
  383.     TQ3ColorRGBPtr = ^TQ3ColorRGB;
  384.     TQ3ColorRGB = RECORD
  385.         r:                        Single;
  386.         g:                        Single;
  387.         b:                        Single;
  388.     END;
  389.  
  390.     TQ3ColorARGBPtr = ^TQ3ColorARGB;
  391.     TQ3ColorARGB = RECORD
  392.         a:                        Single;
  393.         r:                        Single;
  394.         g:                        Single;
  395.         b:                        Single;
  396.     END;
  397.  
  398. {*****************************************************************************
  399.  **                                                                             **
  400.  **                                    Vertices                                 **
  401.  **                                                                             **
  402.  ****************************************************************************}
  403.     TQ3Vertex3DPtr = ^TQ3Vertex3D;
  404.     TQ3Vertex3D = RECORD
  405.         point:                    TQ3Point3D;
  406.         attributeSet:            TQ3AttributeSet;
  407.     END;
  408.  
  409. {*****************************************************************************
  410.  **                                                                             **
  411.  **                                    Matrices                                 **
  412.  **                                                                             **
  413.  ****************************************************************************}
  414.     TQ3Matrix3x3Ptr = ^TQ3Matrix3x3;
  415.     TQ3Matrix3x3 = RECORD
  416.         value:                    ARRAY [0..2,0..2] OF Single;
  417.     END;
  418.  
  419.     TQ3Matrix4x4Ptr = ^TQ3Matrix4x4;
  420.     TQ3Matrix4x4 = RECORD
  421.         value:                    ARRAY [0..3,0..3] OF Single;
  422.     END;
  423.  
  424. {*****************************************************************************
  425.  **                                                                             **
  426.  **                                Bitmap/Pixmap                                 **
  427.  **                                                                             **
  428.  ****************************************************************************}
  429.     TQ3PixmapPtr = ^TQ3Pixmap;
  430.     TQ3Pixmap = RECORD
  431.         image:                    Ptr;
  432.         width:                    UInt32;
  433.         height:                    UInt32;
  434.         rowBytes:                UInt32;
  435.         pixelSize:                UInt32;                                    {  MUST be 16 or 32 to use with the    Interactive Renderer on Mac OS }
  436.         pixelType:                TQ3PixelType;
  437.         bitOrder:                TQ3Endian;
  438.         byteOrder:                TQ3Endian;
  439.     END;
  440.  
  441.     TQ3StoragePixmapPtr = ^TQ3StoragePixmap;
  442.     TQ3StoragePixmap = RECORD
  443.         image:                    TQ3StorageObject;
  444.         width:                    UInt32;
  445.         height:                    UInt32;
  446.         rowBytes:                UInt32;
  447.         pixelSize:                UInt32;                                    {  MUST be 16 or 32 to use with the    Interactive Renderer on Mac OS }
  448.         pixelType:                TQ3PixelType;
  449.         bitOrder:                TQ3Endian;
  450.         byteOrder:                TQ3Endian;
  451.     END;
  452.  
  453.     TQ3BitmapPtr = ^TQ3Bitmap;
  454.     TQ3Bitmap = RECORD
  455.         image:                    Ptr;
  456.         width:                    UInt32;
  457.         height:                    UInt32;
  458.         rowBytes:                UInt32;
  459.         bitOrder:                TQ3Endian;
  460.     END;
  461.  
  462.     TQ3MipmapImagePtr = ^TQ3MipmapImage;
  463.     TQ3MipmapImage = RECORD
  464.                                                                         {  An image for use as a texture mipmap   }
  465.         width:                    UInt32;                                    {  Width of mipmap, must be power of 2    }
  466.         height:                    UInt32;                                    {  Height of mipmap, must be power of 2   }
  467.         rowBytes:                UInt32;                                    {  Rowbytes of mipmap                     }
  468.         offset:                    UInt32;                                    {  Offset from image base to this mipmap  }
  469.     END;
  470.  
  471.     TQ3MipmapPtr = ^TQ3Mipmap;
  472.     TQ3Mipmap = RECORD
  473.         image:                    TQ3StorageObject;                        {  Data containing the texture map and       }
  474.                                                                         {  if (useMipmapping==kQ3True) the           }
  475.                                                                         {  mipmap data                               }
  476.         useMipmapping:            TQ3Boolean;                                {  True if mipmapping should be used       }
  477.                                                                         {  and all mipmaps have been provided     }
  478.         pixelType:                TQ3PixelType;
  479.         bitOrder:                TQ3Endian;
  480.         byteOrder:                TQ3Endian;
  481.         reserved:                UInt32;                                    {  leave NULL for next version              }
  482.         mipmaps:                ARRAY [0..31] OF TQ3MipmapImage;        {  The actual number of mipmaps is determined from the size of the first mipmap  }
  483.     END;
  484.  
  485.  
  486.  
  487.     TQ3CompressedPixmapPtr = ^TQ3CompressedPixmap;
  488.     TQ3CompressedPixmap = RECORD
  489.         compressedImage:        TQ3StorageObject;                        {  storage obj containing compressed image data  }
  490.         imageDescByteOrder:        TQ3Endian;                                {  endianness of the data in the imageDesc  }
  491.         imageDesc:                TQ3StorageObject;                        {  storage obj containing image description created by Quicktime to store info about compressed image  }
  492.         makeMipmaps:            TQ3Boolean;
  493.         width:                    UInt32;
  494.         height:                    UInt32;
  495.         pixelSize:                UInt32;
  496.         pixelType:                TQ3PixelType;
  497.     END;
  498.  
  499.  
  500. {*****************************************************************************
  501.  **                                                                             **
  502.  **                        Higher dimension quantities                             **
  503.  **                                                                             **
  504.  ****************************************************************************}
  505.     TQ3AreaPtr = ^TQ3Area;
  506.     TQ3Area = RECORD
  507.         min:                    TQ3Point2D;
  508.         max:                    TQ3Point2D;
  509.     END;
  510.  
  511.     TQ3PlaneEquationPtr = ^TQ3PlaneEquation;
  512.     TQ3PlaneEquation = RECORD
  513.         normal:                    TQ3Vector3D;
  514.         constant:                Single;
  515.     END;
  516.  
  517.     TQ3BoundingBoxPtr = ^TQ3BoundingBox;
  518.     TQ3BoundingBox = RECORD
  519.         min:                    TQ3Point3D;
  520.         max:                    TQ3Point3D;
  521.         isEmpty:                TQ3Boolean;
  522.     END;
  523.  
  524.     TQ3BoundingSpherePtr = ^TQ3BoundingSphere;
  525.     TQ3BoundingSphere = RECORD
  526.         origin:                    TQ3Point3D;
  527.         radius:                    Single;
  528.         isEmpty:                TQ3Boolean;
  529.     END;
  530.  
  531. {
  532.  *    The TQ3ComputeBounds flag passed to StartBoundingBox or StartBoundingSphere
  533.  *    calls in the View. It's a hint to the system as to how it should 
  534.  *    compute the bbox of a shape:
  535.  *
  536.  *    kQ3ComputeBoundsExact:    
  537.  *        Vertices of shapes are transformed into world space and
  538.  *        the world space bounding box is computed from them.  Slow!
  539.  *    
  540.  *    kQ3ComputeBoundsApproximate: 
  541.  *        A local space bounding box is computed from a shape's
  542.  *        vertices.  This bbox is then transformed into world space,
  543.  *        and its bounding box is taken as the shape's approximate
  544.  *        bbox.  Fast but the bbox is larger than optimal.
  545.  }
  546.     TQ3ComputeBounds             = SInt32;
  547. CONST
  548.     kQ3ComputeBoundsExact        = 0;
  549.     kQ3ComputeBoundsApproximate    = 1;
  550.  
  551.  
  552. {*****************************************************************************
  553.  **                                                                             **
  554.  **                            Object System Types                                 **
  555.  **                                                                             **
  556.  ****************************************************************************}
  557.  
  558.  
  559. TYPE
  560.     TQ3XObjectClass = ^LONGINT;
  561.     TQ3XMethodType                        = UInt32;
  562. {
  563.  * Object methods
  564.  }
  565.  *  Return true from the metahandler if this 
  566.  *  object can be submitted in a rendering loop 
  567.  }
  568. {$IFC TYPED_FUNCTION_POINTERS}
  569.     TQ3XFunctionPointer = PROCEDURE; C;
  570. {$ELSEC}
  571.     TQ3XFunctionPointer = ProcPtr;
  572. {$ENDC}
  573.  
  574. {$IFC TYPED_FUNCTION_POINTERS}
  575.     TQ3XMetaHandler = FUNCTION(methodType: TQ3XMethodType): TQ3XFunctionPointer; C;
  576. {$ELSEC}
  577.     TQ3XMetaHandler = ProcPtr;
  578. {$ENDC}
  579.  
  580. {
  581.  * MetaHandler:
  582.  *        When you give a metahandler to QuickDraw 3D, it is called multiple 
  583.  *        times to build method tables, and then is thrown away. You are 
  584.  *        guaranteed that your metahandler will never be called again after a 
  585.  *        call that was passed a metahandler returns.
  586.  *
  587.  *        Your metahandler should contain a switch on the methodType passed to it
  588.  *        and should return the corresponding method as an TQ3XFunctionPointer.
  589.  *
  590.  *        IMPORTANT: A metaHandler MUST always "return" a value. If you are
  591.  *        passed a methodType that you do not understand, ALWAYS return NULL.
  592.  *
  593.  *        These types here are prototypes of how your functions should look.
  594.  }
  595. {$IFC TYPED_FUNCTION_POINTERS}
  596.     TQ3XObjectUnregisterMethod = FUNCTION(objectClass: TQ3XObjectClass): TQ3Status; C;
  597. {$ELSEC}
  598.     TQ3XObjectUnregisterMethod = ProcPtr;
  599. {$ENDC}
  600.  
  601. {
  602.  * See QD3DIO.h for the IO method types: 
  603.  *        ObjectReadData, ObjectTraverse, ObjectWrite
  604.  }
  605.  
  606. {*****************************************************************************
  607.  **                                                                             **
  608.  **                                Set Types                                     **
  609.  **                                                                             **
  610.  ****************************************************************************}
  611.     TQ3ElementType                        = LONGINT;
  612.  
  613. CONST
  614.     kQ3ElementTypeNone            = 0;
  615.     kQ3ElementTypeUnknown        = 32;
  616.     kQ3ElementTypeSet            = 33;
  617.  
  618.  
  619.  *    kQ3ElementTypeUnknown is a TQ3Object. 
  620.  *    
  621.  *        Do Q3Set_Add(s, ..., &obj) or Q3Set_Get(s, ..., &obj);
  622.  *        
  623.  *        Note that the object is always referenced when copying around. 
  624.  *        
  625.  *        Generally, it is an Unknown object, a Group of Unknown objects, or a 
  626.  *        group of other "objects" which have been found in the metafile and
  627.  *        have no attachment method to their parent. Be prepared to handle
  628.  *        any or all of these cases if you actually access the set on a shape.
  629.  *
  630.  *    kQ3ElementTypeSet is a TQ3SetObject. 
  631.  *    
  632.  *        Q3Shape_GetSet(s,&o) is eqivalent to 
  633.  *            Q3Shape_GetElement(s, kQ3ElementTypeSet, &o)
  634.  *            
  635.  *        Q3Shape_SetSet(s,o)  is eqivalent to 
  636.  *            Q3Shape_SetElement(s, kQ3ElementTypeSet, &o)
  637.  *    
  638.  *        Note that the object is always referenced when copying around. 
  639.  *        
  640.  *    See the note below about the Set and Shape changes.
  641.  }
  642.  
  643. {*****************************************************************************
  644.  **                                                                             **
  645.  **                            Object System Macros                             **
  646.  **                                                                             **
  647.  ****************************************************************************}
  648. {*****************************************************************************
  649.  **                                                                             **
  650.  **                                Object Types                                 **
  651.  **                                                                             **
  652.  ****************************************************************************}
  653. {
  654.  * Note:    a call to Q3Foo_GetType will return a value kQ3FooTypeBar
  655.  *            e.g. Q3Shared_GetType(object) returns kQ3SharedTypeShape, etc.
  656.  }
  657.     kQ3ObjectTypeInvalid        = 0;
  658.     kQ3ObjectTypeView            = 'view';
  659.     kQ3ObjectTypeElement        = 'elmn';
  660.     kQ3ElementTypeAttribute        = 'eatt';
  661.     kQ3ObjectTypePick            = 'pick';
  662.     kQ3PickTypeWindowPoint        = 'pkwp';
  663.     kQ3PickTypeWindowRect        = 'pkwr';
  664.     kQ3PickTypeWorldRay            = 'pkry';
  665.     kQ3ObjectTypeShared            = 'shrd';
  666.     kQ3SharedTypeRenderer        = 'rddr';
  667.     kQ3RendererTypeWireFrame    = 'wrfr';
  668.     kQ3RendererTypeGeneric        = 'gnrr';
  669.     kQ3RendererTypeInteractive    = 'ctwn';
  670.     kQ3SharedTypeShape            = 'shap';
  671.     kQ3ShapeTypeGeometry        = 'gmtr';
  672.     kQ3GeometryTypeBox            = 'box ';
  673.     kQ3GeometryTypeGeneralPolygon = 'gpgn';
  674.     kQ3GeometryTypeLine            = 'line';
  675.     kQ3GeometryTypeMarker        = 'mrkr';
  676.     kQ3GeometryTypePixmapMarker    = 'mrkp';
  677.     kQ3GeometryTypeMesh            = 'mesh';
  678.     kQ3GeometryTypeNURBCurve    = 'nrbc';
  679.     kQ3GeometryTypeNURBPatch    = 'nrbp';
  680.     kQ3GeometryTypePoint        = 'pnt ';
  681.     kQ3GeometryTypePolygon        = 'plyg';
  682.     kQ3GeometryTypePolyLine        = 'plyl';
  683.     kQ3GeometryTypeTriangle        = 'trng';
  684.     kQ3GeometryTypeTriGrid        = 'trig';
  685.     kQ3GeometryTypeCone            = 'cone';
  686.     kQ3GeometryTypeCylinder        = 'cyln';
  687.     kQ3GeometryTypeDisk            = 'disk';
  688.     kQ3GeometryTypeEllipse        = 'elps';
  689.     kQ3GeometryTypeEllipsoid    = 'elpd';
  690.     kQ3GeometryTypePolyhedron    = 'plhd';
  691.     kQ3GeometryTypeTorus        = 'tors';
  692.     kQ3GeometryTypeTriMesh        = 'tmsh';
  693.     kQ3ShapeTypeShader            = 'shdr';
  694.     kQ3ShaderTypeSurface        = 'sush';
  695.     kQ3SurfaceShaderTypeTexture    = 'txsu';
  696.     kQ3ShaderTypeIllumination    = 'ilsh';
  697.     kQ3IlluminationTypePhong    = 'phil';
  698.     kQ3IlluminationTypeLambert    = 'lmil';
  699.     kQ3IlluminationTypeNULL        = 'nuil';
  700.     kQ3ShapeTypeStyle            = 'styl';
  701.     kQ3StyleTypeBackfacing        = 'bckf';
  702.     kQ3StyleTypeInterpolation    = 'intp';
  703.     kQ3StyleTypeFill            = 'fist';
  704.     kQ3StyleTypePickID            = 'pkid';
  705.     kQ3StyleTypeReceiveShadows    = 'rcsh';
  706.     kQ3StyleTypeHighlight        = 'high';
  707.     kQ3StyleTypeSubdivision        = 'sbdv';
  708.     kQ3StyleTypeOrientation        = 'ofdr';
  709.     kQ3StyleTypePickParts        = 'pkpt';
  710.     kQ3StyleTypeAntiAlias        = 'anti';
  711.     kQ3StyleTypeFog                = 'fogg';
  712.     kQ3ShapeTypeTransform        = 'xfrm';
  713.     kQ3TransformTypeMatrix        = 'mtrx';
  714.     kQ3TransformTypeScale        = 'scal';
  715.     kQ3TransformTypeTranslate    = 'trns';
  716.     kQ3TransformTypeRotate        = 'rott';
  717.     kQ3TransformTypeRotateAboutPoint = 'rtap';
  718.     kQ3TransformTypeRotateAboutAxis = 'rtaa';
  719.     kQ3TransformTypeQuaternion    = 'qtrn';
  720.     kQ3TransformTypeReset        = 'rset';
  721.     kQ3ShapeTypeLight            = 'lght';
  722.     kQ3LightTypeAmbient            = 'ambn';
  723.     kQ3LightTypeDirectional        = 'drct';
  724.     kQ3LightTypePoint            = 'pntl';
  725.     kQ3LightTypeSpot            = 'spot';
  726.     kQ3ShapeTypeCamera            = 'cmra';
  727.     kQ3CameraTypeOrthographic    = 'orth';
  728.     kQ3CameraTypeViewPlane        = 'vwpl';
  729.     kQ3CameraTypeViewAngleAspect = 'vana';
  730.     kQ3ShapeTypeStateOperator    = 'stop';
  731.     kQ3StateOperatorTypePush    = 'push';
  732.     kQ3StateOperatorTypePop        = 'pop ';
  733.     kQ3ShapeTypeGroup            = 'grup';
  734.     kQ3GroupTypeDisplay            = 'dspg';
  735.     kQ3DisplayGroupTypeOrdered    = 'ordg';
  736.     kQ3DisplayGroupTypeIOProxy    = 'iopx';
  737.     kQ3GroupTypeLight            = 'lghg';
  738.     kQ3GroupTypeInfo            = 'info';
  739.     kQ3ShapeTypeUnknown            = 'unkn';
  740.     kQ3UnknownTypeText            = 'uktx';
  741.     kQ3UnknownTypeBinary        = 'ukbn';
  742.     kQ3ShapeTypeReference        = 'rfrn';
  743.     kQ3ReferenceTypeExternal    = 'rfex';
  744.     kQ3SharedTypeSet            = 'set ';
  745.     kQ3SetTypeAttribute            = 'attr';
  746.     kQ3SharedTypeDrawContext    = 'dctx';
  747.     kQ3DrawContextTypePixmap    = 'dpxp';
  748.     kQ3DrawContextTypeMacintosh    = 'dmac';
  749.     kQ3DrawContextTypeWin32DC    = 'dw32';
  750.     kQ3DrawContextTypeDDSurface    = 'ddds';
  751.     kQ3DrawContextTypeX11        = 'dx11';
  752.     kQ3SharedTypeTexture        = 'txtr';
  753.     kQ3TextureTypePixmap        = 'txpm';
  754.     kQ3TextureTypeMipmap        = 'txmm';
  755.     kQ3TextureTypeCompressedPixmap = 'txcp';
  756.     kQ3SharedTypeFile            = 'file';
  757.     kQ3SharedTypeStorage        = 'strg';
  758.     kQ3StorageTypeMemory        = 'mems';
  759.     kQ3MemoryStorageTypeHandle    = 'hndl';
  760.     kQ3StorageTypeUnix            = 'uxst';
  761.     kQ3UnixStorageTypePath        = 'unix';
  762.     kQ3StorageTypeMacintosh        = 'macn';
  763.     kQ3MacintoshStorageTypeFSSpec = 'macp';
  764.     kQ3StorageTypeWin32            = 'wist';
  765.     kQ3SharedTypeString            = 'strn';
  766.     kQ3StringTypeCString        = 'strc';
  767.     kQ3SharedTypeShapePart        = 'sprt';
  768.     kQ3ShapePartTypeMeshPart    = 'spmh';
  769.     kQ3MeshPartTypeMeshFacePart    = 'mfac';
  770.     kQ3MeshPartTypeMeshEdgePart    = 'medg';
  771.     kQ3MeshPartTypeMeshVertexPart = 'mvtx';
  772.     kQ3SharedTypeControllerState = 'ctst';
  773.     kQ3SharedTypeTracker        = 'trkr';
  774.     kQ3SharedTypeViewHints        = 'vwhn';
  775.     kQ3SharedTypeEndGroup        = 'endg';
  776.  
  777. {*****************************************************************************
  778.  **                                                                             **
  779.  **                            QuickDraw 3D System Routines                     **
  780.  **                                                                             **
  781.  ****************************************************************************}
  782. FUNCTION Q3Initialize: TQ3Status; C;
  783. FUNCTION Q3Exit: TQ3Status; C;
  784. FUNCTION Q3IsInitialized: TQ3Boolean; C;
  785. FUNCTION Q3GetVersion(VAR majorRevision: UInt32; VAR minorRevision: UInt32): TQ3Status; C;
  786. {
  787.  *  Q3GetReleaseVersion returns the release version number,
  788.  *  in the format of the first four bytes of a 'vers' resource
  789.  *  (e.g. 0x01518000 ==> 1.5.1 release).
  790.  }
  791. FUNCTION Q3GetReleaseVersion(VAR releaseRevision: UInt32): TQ3Status; C;
  792.  
  793. {*****************************************************************************
  794.  **                                                                             **
  795.  **                            ObjectClass Routines                             **
  796.  **                                                                             **
  797.  ****************************************************************************}
  798.  *  New object system calls to query the object system.
  799.  *
  800.  *  These comments to move to the stubs file before final release, they 
  801.  *  are here for documentation for developers using early seeds.
  802.  }
  803. {
  804.  *  Given a class name as a string return the associated class type for the 
  805.  *  class, may return kQ3Failure if the string representing the class is 
  806.  *  invalid.
  807.  }
  808. FUNCTION Q3ObjectHierarchy_GetTypeFromString(VAR objectClassString: TQ3ObjectClassNameString; VAR objectClassType: TQ3ObjectType): TQ3Status; C;
  809. {
  810.  *  Given a class type as return the associated string for the class name, 
  811.  *  may return kQ3Failure if the type representing the class is invalid.
  812.  }
  813. FUNCTION Q3ObjectHierarchy_GetStringFromType(objectClassType: TQ3ObjectType; VAR objectClassString: TQ3ObjectClassNameString): TQ3Status; C;
  814.  *  Return true if the class with this type is registered, false if not 
  815.  }
  816. FUNCTION Q3ObjectHierarchy_IsTypeRegistered(objectClassType: TQ3ObjectType): TQ3Boolean; C;
  817.  *  Return true if the class with this name is registered, false if not 
  818.  }
  819. FUNCTION Q3ObjectHierarchy_IsNameRegistered(objectClassName: ConstCStringPtr): TQ3Boolean; C;
  820. {
  821.  * TQ3SubClassData is used when querying the object system for
  822.  * the subclasses of a particular parent type:
  823.  }
  824.  
  825. TYPE
  826.     TQ3SubClassDataPtr = ^TQ3SubClassData;
  827.     TQ3SubClassData = RECORD
  828.         numClasses:                UInt32;                                    {  the # of subclass types found for a parent class  }
  829.         classTypes:                TQ3ObjectTypePtr;                        {  an array containing the class types  }
  830.     END;
  831.  
  832. {
  833.  *  Given a parent type and an instance of the TQ3SubClassData struct fill
  834.  *  it in with the number and class types of all of the subclasses immediately
  835.  *  below the parent in the class hierarchy.  Return kQ3Success to indicate no
  836.  *  errors occurred, else kQ3Failure.
  837.  *
  838.  *  NOTE:  This function will allocate memory for the classTypes array.  Be 
  839.  *    sure to call Q3ObjectClass_EmptySubClassData to free this memory up.
  840.  }
  841. FUNCTION Q3ObjectHierarchy_GetSubClassData(objectClassType: TQ3ObjectType; VAR subClassData: TQ3SubClassData): TQ3Status; C;
  842. {
  843.  *  Given an instance of the TQ3SubClassData struct free all memory allocated 
  844.  *    by the Q3ObjectClass_GetSubClassData call.
  845.  *
  846.  *  NOTE: This call MUST be made after a call to Q3ObjectClass_GetSubClassData
  847.  *  to avoid memory leaks.
  848.  }
  849. FUNCTION Q3ObjectHierarchy_EmptySubClassData(VAR subClassData: TQ3SubClassData): TQ3Status; C;
  850.  
  851. {*****************************************************************************
  852.  **                                                                             **
  853.  **                                Object Routines                                 **
  854.  **                                                                             **
  855.  ****************************************************************************}
  856. FUNCTION Q3Object_Dispose(object: TQ3Object): TQ3Status; C;
  857. FUNCTION Q3Object_Duplicate(object: TQ3Object): TQ3Object; C;
  858. FUNCTION Q3Object_Submit(object: TQ3Object; view: TQ3ViewObject): TQ3Status; C;
  859. FUNCTION Q3Object_IsDrawable(object: TQ3Object): TQ3Boolean; C;
  860. FUNCTION Q3Object_IsWritable(object: TQ3Object; theFile: TQ3FileObject): TQ3Boolean; C;
  861.  
  862. {*****************************************************************************
  863.  **                                                                             **
  864.  **                            Object Type Routines                             **
  865.  **                                                                             **
  866.  ****************************************************************************}
  867. FUNCTION Q3Object_GetType(object: TQ3Object): TQ3ObjectType; C;
  868. FUNCTION Q3Object_GetLeafType(object: TQ3Object): TQ3ObjectType; C;
  869. FUNCTION Q3Object_IsType(object: TQ3Object; theType: TQ3ObjectType): TQ3Boolean; C;
  870.  
  871. {*****************************************************************************
  872.  **                                                                             **
  873.  **                            Shared Object Routines                             **
  874.  **                                                                             **
  875.  ****************************************************************************}
  876. FUNCTION Q3Shared_GetType(sharedObject: TQ3SharedObject): TQ3ObjectType; C;
  877. FUNCTION Q3Shared_GetReference(sharedObject: TQ3SharedObject): TQ3SharedObject; C;
  878.  *    Q3Shared_IsReferenced
  879.  *        Returns kQ3True if there is more than one reference to sharedObject.
  880.  *        Returns kQ3False if there is ONE reference to sharedObject.
  881.  *    
  882.  *    This call is intended to allow applications and plug-in objects to delete
  883.  *    objects of which they hold THE ONLY REFERENCE. This is useful when
  884.  *    caching objects, etc.
  885.  *    
  886.  *    Although many may be tempted, DO NOT DO THIS:
  887.  *        while (Q3Shared_IsReferenced(foo)) ( Q3Object_Dispose(foo); )
  888.  *    
  889.  *    Your application will crash and no one will buy it. Chapter 11 is 
  890.  *    never fun (unless you short the stock). Thanks.
  891.  }
  892. FUNCTION Q3Shared_IsReferenced(sharedObject: TQ3SharedObject): TQ3Boolean; C;
  893. {
  894.  *    Q3Shared_GetEditIndex
  895.  *        Returns the "serial number" of sharedObject. Usefuly for caching 
  896.  *        object information. Returns 0 on error.
  897.  *        
  898.  *        Hold onto this number to determine if an object has changed since you
  899.  *        last built your caches... To validate, do:
  900.  *        
  901.  *        if (Q3Shared_GetEditIndex(foo) == oldFooEditIndex) (
  902.  *            // Cache is valid
  903.  *        ) else (
  904.  *            // Cache is invalid
  905.  *            RebuildSomeSortOfCache(foo);
  906.  *            oldFooEditIndex = Q3Shared_GetEditIndex(foo);
  907.  *        )
  908.  }
  909. FUNCTION Q3Shared_GetEditIndex(sharedObject: TQ3SharedObject): UInt32; C;
  910. {
  911.  *    Q3Shared_Edited
  912.  *        Bumps the "serial number" of sharedObject to a different value. This
  913.  *        call is intended to be used solely from a plug-in object which is 
  914.  *        shared. Call this whenever your private instance data changes.
  915.  *        
  916.  *        Returns kQ3Failure iff sharedObject is not a shared object, OR
  917.  *            QuickDraw 3D isn't initialized.
  918.  }
  919. FUNCTION Q3Shared_Edited(sharedObject: TQ3SharedObject): TQ3Status; C;
  920.  
  921. {*****************************************************************************
  922.  **                                                                             **
  923.  **                                Shape Routines                                 **
  924.  **                                                                             **
  925.  ****************************************************************************}
  926. {
  927.  *    QuickDraw 3D 1.5 Note:
  928.  *
  929.  *    Shapes and Sets are now (sort of) polymorphic.
  930.  *
  931.  *        You may call Q3Shape_Foo or Q3Set_Foo on a shape or a set.
  932.  *        The following calls are identical, in implementation:
  933.  *
  934.  *            Q3Shape_GetElement            =    Q3Set_Get
  935.  *            Q3Shape_AddElement            =    Q3Set_Add
  936.  *            Q3Shape_ContainsElement        =    Q3Set_Contains
  937.  *            Q3Shape_GetNextElementType    =    Q3Set_GetNextElementType
  938.  *            Q3Shape_EmptyElements        =    Q3Set_Empty
  939.  *            Q3Shape_ClearElement        =    Q3Set_Clear
  940.  *
  941.  *    All of these calls accept a shape or a set as their first parameter.
  942.  *
  943.  *    The Q3Shape_GetSet and Q3ShapeSetSet calls are implemented via a new
  944.  *    element type kQ3ElementTypeSet. See the note above about 
  945.  *    kQ3ElementTypeSet;
  946.  *
  947.  *    It is important to note that the new Q3Shape_...Element... calls do not
  948.  *    create a set on a shape and then add the element to it. This data is
  949.  *    attached directly to the shape. Therefore, it is possible for an element
  950.  *    to exist on a shape without a set existing on it as well. 
  951.  *
  952.  *    In your application, if you attach an element to a shape like this:
  953.  *        (this isn't checking for errors for simplicity)
  954.  *
  955.  *        set = Q3Set_New();
  956.  *        Q3Set_AddElement(set, kMyElemType, &data);
  957.  *        Q3Shape_SetSet(shape, set);
  958.  *
  959.  *    You should retrieve it in the same manner:
  960.  *
  961.  *        Q3Shape_GetSet(shape, &set);
  962.  *        if (Q3Set_Contains(set, kMyElemType) == kTrue) (
  963.  *            Q3Set_Get(set, kMyElemType, &data);
  964.  *        )
  965.  *
  966.  *    Similarly, if you attach data to a shape with the new calls:
  967.  *
  968.  *        Q3Shape_AddElement(shape, kMyElemType, &data);
  969.  *
  970.  *    You should retrieve it in the same manner:
  971.  *
  972.  *        if (Q3Shape_ContainsElement(set, kMyElemType) == kTrue) (
  973.  *            Q3Shape_GetElement(set, kMyElemType, &data);
  974.  *        )
  975.  *
  976.  *    This really becomes an issue when dealing with version 1.0 and version 1.1 
  977.  *    metafiles.
  978.  *
  979.  *    When attempting to find a particular element on a shape, you should
  980.  *    first check with Q3Shape_GetNextElementType or Q3Shape_GetElement, then,
  981.  *    Q3Shape_GetSet(s, &set) (or Q3Shape_GetElement(s, kQ3ElementTypeSet, &set))
  982.  *    and then Q3Shape_GetElement(set, ...).
  983.  *
  984.  *    In terms of implementation, Q3Shape_SetSet and Q3Shape_GetSet should only be
  985.  *    used for sets of information that are shared among multiple shapes.
  986.  *    
  987.  *    Q3Shape_AddElement, Q3Shape_GetElement, etc. calls should only be used
  988.  *    for elements that are unique for a particular shape.
  989.  *    
  990.  }
  991. FUNCTION Q3Shape_GetType(shape: TQ3ShapeObject): TQ3ObjectType; C;
  992. FUNCTION Q3Shape_GetSet(shape: TQ3ShapeObject; VAR theSet: TQ3SetObject): TQ3Status; C;
  993. FUNCTION Q3Shape_SetSet(shape: TQ3ShapeObject; theSet: TQ3SetObject): TQ3Status; C;
  994. FUNCTION Q3Shape_AddElement(shape: TQ3ShapeObject; theType: TQ3ElementType; data: UNIV Ptr): TQ3Status; C;
  995. FUNCTION Q3Shape_GetElement(shape: TQ3ShapeObject; theType: TQ3ElementType; data: UNIV Ptr): TQ3Status; C;
  996. FUNCTION Q3Shape_ContainsElement(shape: TQ3ShapeObject; theType: TQ3ElementType): TQ3Boolean; C;
  997. FUNCTION Q3Shape_GetNextElementType(shape: TQ3ShapeObject; VAR theType: TQ3ElementType): TQ3Status; C;
  998. FUNCTION Q3Shape_EmptyElements(shape: TQ3ShapeObject): TQ3Status; C;
  999. FUNCTION Q3Shape_ClearElement(shape: TQ3ShapeObject; theType: TQ3ElementType): TQ3Status; C;
  1000.  
  1001. {*****************************************************************************
  1002.  **                                                                             **
  1003.  **                            Color Table Routines                             **
  1004.  **                                                                             **
  1005.  ****************************************************************************}
  1006. FUNCTION Q3Bitmap_Empty(VAR bitmap: TQ3Bitmap): TQ3Status; C;
  1007. FUNCTION Q3Bitmap_GetImageSize(width: UInt32; height: UInt32): UInt32; C;
  1008.  
  1009.  
  1010. {$ALIGN RESET}
  1011. {$POP}
  1012.  
  1013. {$SETC UsingIncludes := QD3DIncludes}
  1014.  
  1015. {$ENDC} {__QD3D__}
  1016.  
  1017. {$IFC NOT UsingIncludes}
  1018.  END.
  1019. {$ENDC}
  1020.